package no.mehdi.usereg.core.service.support;

import java.util.List;

import no.mehdi.usereg.core.domain.Person;
import no.mehdi.usereg.core.repository.PersonRepository;
import no.mehdi.usereg.core.service.PersonService;

public class PersonServiceImpl implements PersonService{
	PersonRepository personRepository;


	@Override
	public void registerPerson(String name) {
		Person person = new Person();
		person.setName(name);
		personRepository.savePerson(person);
	}

	@Override
	public List<Person> getAllRegisteredPerson() {
		return personRepository.getAllEnteries();
	}
	public void setPersonRepository(PersonRepository personRepository) {
		this.personRepository = personRepository;
	}
}
